import time

from selenium import webdriver
from selenium.webdriver import Keys, ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.edge.service import Service

if __name__ == '__main__':
    exe_path = "../driver/msedgedriver.exe"
    service = Service(executable_path=exe_path)
    brower = webdriver.Edge(service=service)
    brower.maximize_window()
    brower.get(url="https://www.jd.com")

    element = brower.find_element(by=By.CLASS_NAME, value="user_profit_lk")
    print(element.size)

    action = ActionChains(brower)
    action.move_to_element(element)
    action.click(element)
    action.perform()
    time.sleep(10)
    brower.quit()
